using System;
using System.Collections.Generic;
using System.Text;

namespace XProject.Entity
{
   public class Event
   {
       #region fields
       int id;
       Account account;
       DateTime startTime;
       DateTime endTime;
       byte lunarDay;
       byte lunarMonth;
       string content;
       string place;
       EventType type;
       byte priority;       
       string note;
       bool isPublic;
       #endregion
       #region constructors
       public Event()
       {
           id = -1;
           account = new Account();
           startTime = new DateTime();
           endTime = new DateTime();
           lunarDay = 0;
           lunarMonth = 0;
           content = "";
           type = new EventType();
           priority = 0;
           note = "";
           place = "";
       }
       #endregion
       #region properties
       public int EventID
       {
           get { return id; }
           set { id = value; }
       }
       public Account Account
       {
           get { return account; }
           set { account = value; }
       }
       public DateTime StartTime
       {
           get { return startTime; }
           set { startTime = value; }

       }
       public DateTime EndTime
       {
           get { return endTime; }
           set { endTime = value; }
       }
       public byte LunarDay
       {
           get { return lunarDay; }
           set { lunarDay = value; }
       }
       public byte LunarMonth
       {
           get { return lunarMonth; }
           set { lunarMonth = value; }
       }
       public string Content
       {
           get { return content; }
           set { content = value; }
               
       }
       public string Place
       {
           get { return place; }
           set { place = value; }
       }
       public byte Priority
       {
           get { return priority; }
           set { priority = value; }
       }
       public string Note
       {
           get { return note; }
           set { note = value; }
       }
       public EventType Type
       {
           get { return type; }
           set { type = value; }
       }
       public bool IsPublic
       {
           get { return isPublic; }
           set{isPublic=value;}
       }
       public override bool Equals(object obj)
       {
           Event ev = obj as Event;
           return this.EventID==ev.EventID;
       }
       #endregion
   }
}
